<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
    <title>Test Map</title>
    <link rel="stylesheet" href="http://192.168.20.117:8080/arcgisapi/4.1/dijit/themes/claro/claro.css" />
    <link rel="stylesheet" href="http://192.168.20.117:8080/arcgisapi/4.1/esri/css/main.css" />
    <style>
      html, body, #ui-map-view {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
      }
    </style>
    <script src="http://192.168.20.117:8080/arcgisapi/4.1/init.js"></script>
    <script>
      var myMap, view;
      require([
        "esri/Basemap",
        "esri/layers/TileLayer",
        "esri/Map",
        "esri/views/MapView",
        "dojo/domReady!"
      ], function (Basemap, TileLayer, Map, MapView){
        // --------------------------------------------------------------------
        // If you do not have public Internet access then use the Basemap class
        // and point this URL to your own locally accessible cached service.
        // 
        // Otherwise you can just use one of the named hosted ArcGIS services.
        // --------------------------------------------------------------------
        var layer = new TileLayer({
          	url: "http://192.168.20.117:6080/arcgis/rest/services/SampleWorldCities/MapServer"
        });
        var customBasemap = new Basemap({
          baseLayers: [layer],
          title: "Custom Basemap",
          id: "myBasemap"
        });
        myMap = new Map({
          basemap: customBasemap
        });
        view = new MapView({
          //center: [-111.87, 40.57], // long, lat
          container: "ui-map-view",
          map: myMap
        });
        view.then(function(){
        	console.log("All the resources in the MapView and the map have loaded. Now execute additional processes");
        }, function(error){
         // Use the errback function to handle when the view doesn't load properly
         	console.log("The view's resources failed to load: ", error);
        });
      });
    </script>
  </head>
  <body class="claro">
    <div id="ui-map-view"></div>
  </body>
</html>